const buildBase = 1;
export const initStorage = {
  userData: {},
  sysInfo: {},
  userInfo: {
    avatarUrl: "",
    nickname: "",
  },
  unlockDocIds: [],
  adNum: 0,
};

export const initState = {
  windowWidth: null,
  windowHeight: null,
  keyboardHeight: 0,
  nowDate: new Date(),
  isFocus: true,
  theme: "light",
  noticeMsg: {},
  appShow: true,
  isTest: false,
};

export const getters = {
  sortIndexList(state) {
    const list = [...state.indexList].map((it) => {
      return {
        ...it,
        updateAt: it.updateAt || it.postAt,
      };
    });
    Array.sortArrayBy(list, "updateAt", true);
    return list;
  },
};
